package com.panfeng.xcloud.component.sms.config;

import com.panfeng.xcloud.component.sms.enums.SMSChannelTypeEnum;
import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.Map;

/**
 * 阿里云短信配置类
 *
 * @author xiaobo
 * @date 2018-02-07
 */
@Data
@Configuration
@ConditionalOnExpression("!'${multi.sms}'.isEmpty()")
@ConfigurationProperties(prefix = "multi.sms")
public class MultiSmsPropConfig {

    //默认走阿里云的短信服务
    private Byte smsChannelType = SMSChannelTypeEnum.ALIYUN.getValue();

    private SmsCodeProp smsCodeProp;

    private AliyunSmsProp aliyunSmsProp;

    private ChuangLanSmsProp chuangLanSmsProp;

    private ChuangLanVoiceCodeProp chuangLanVoiceCodeProp;

    /**
     * 短信模板配置
     */
    private Map<String, String> channels;
}
